﻿<MCard Class="mx-auto" Height="400" Width="256">
    <MNavigationDrawer Class="deep-purple accent-4" Dark Permanent>
        <ChildContent>
            <MList>
                @foreach (var item in _items)
                {
                    <MListItem Link Dark>
                        <MListItemIcon>
                            <MIcon Dark>@item.Icon</MIcon>
                        </MListItemIcon>

                        <MListItemContent>
                            <MListItemTitle>@item.Title</MListItemTitle>
                        </MListItemContent>
                    </MListItem>
                }
            </MList>
        </ChildContent>

        <AppendContent>
            <div class="pa-2">
                <MButton Block Dark>LogOut</MButton>
            </div>
        </AppendContent>
    </MNavigationDrawer>
</MCard>

@code{
    private class ItemDemo
    {
        public string Title { get; set; }
        public string Icon { get; set; }
    }
    private List<ItemDemo> _items = new()
    {
        new ItemDemo { Title = "Dashboard", Icon = "mdi-view-dashboard" },
        new ItemDemo { Title = "Account", Icon = "mdi-account-box" },
        new ItemDemo { Title = "Admin", Icon = "mdi-gavel" }
    };
}